using flickr.api;
using flickr.api.communication;

namespace FlickrShots.Framework
{
    public class Connectr
    {
        private static FlickrShots.Framework.User _currentUser;
        private Connectr() {}

        public static FlickrConnection Connect()
        {
            Flickr flickr = new Flickr(Preferences.ApiKey, Preferences.SharedSecret, Preferences.Instance.Token);

            return flickr.Connection;
        }

        public static bool IsConnected
        {
            get { return FlickrConnectionManager.CurrentConnection.IsAuthorized; }
        }

        public static Flickr Flickr
        {
            get { return FlickrConnectionManager.FlickrApi; }
        }
        public static FlickrConnection Connection
        {
            get { return FlickrConnectionManager.CurrentConnection; }
        }
	    
        public static FlickrShots.Framework.User CurrentUser
        {
            get { return _currentUser; }
            set { _currentUser = value; }
        }
    }
}